Method of selecting training text for language model, and method of training language model using the training text, and computer and computer program for executing the methods

ABSTRACT

Method of selecting training text for language model, and method of training language model using the training text, and computer and computer program for executing the methods. The present invention provides for selecting training text for a language model that includes: generating a template for selecting training text from a corpus in a first domain according to generation techniques of: (i) replacing one or more words in a word string selected from the corpus in the first domain with a special symbol representing any word or word string, and adopting the word string after replacement as a template for selecting the training text; and/or (ii) adopting the word string selected from the corpus in the first domain as the template for selecting the training text; and selecting text covered by the template as the training text from a corpus in a second domain different from the first domain.

CROSS REFERENCE

This application claims priority under 35 U.S.C. §119 from Japan PatentApplication No. 2014-150554 filed Jul. 24, 2014, the entire contents ofwhich are incorporated herein by reference.

FIELD OF INVENTION

The present invention relates to a technique for improving a languagemodel (LM). More specifically, the present invention relates to atechnique for selecting training text for a language model, and atechnique for training a language model using the selected trainingtext.

BACKGROUND

In an automatic speech recognition (ASR) technique, a statisticallanguage model plays an important role. The statistical language modelis acquired by modeling appearance frequency information on a word ormultiple words (hereinafter, also referred to as a “word string”) in acorpus that contains a large amount of natural language sentences.

Training a language model requires a training corpus collected from afield most matching with a target field (also referred to as a “targetdomain”) of an automatic speech recognition application. Constructing atraining corpus requires an enormous amount of sentences in a targetfield (hereinafter, also referred to as a “target field corpus”).Unfortunately, the amount of natural language sentences associated withthe target field is typically limited. Therefore, it is difficult tocollect a large amount of corpora in the target field. In particular,where a target field is a specialized field (e.g., a financial field, ascientific field), it is further difficult to collect a corpus in thetarget field.

Typically, collecting a large amount of natural language trainingsentences requires a dictating operation where a person listens to anutterance in the target field and the person converts the utterance intoa text sentence. However, since this operation is manually performed,the cost is high. Accordingly, the amount of text sentences easilyacquired by a manual process is limited.

In such a situation, machine-readable documents that can be relativelyeasily collected can be used. For instance, enormous amounts ofnewspapers, crawled web text, or social networking services (e.g.,Facebook®, Twitter®, Google+®, Myspace®, LinkedIn® and LINE® in theworld, and, e.g., Mixi®, GREE®, Mobage® and Ameba® in Japan)(hereinafter, also referred to as an “out-of-target-field corpus”).Techniques of selecting natural language sentences required for traininga language model using such machine-readable documents have beendeveloped.

However, it is insufficient to just increase the amount of naturallanguage sentences. It is desirable to construct a language model froman appropriate natural language sentence in conformity with the targetfield of an application (e.g., automatic speech recognition application)to which the language model is applied.

Accordingly, training a language model using sentences contained in asmall-scale corpus in the target field and an enormous amount ofsentences in out-of-target-field corpora is a practical scenario.

Thus, selection of sentences from out-of-target-field corpora has beenresearched with using a statistical model estimated from corpora in thetarget field.

Japanese patent JP2012-78647A describes a language model trainingapparatus used together with means for storing a machine-readable corpusthat stores a corpus containing multiple natural language sentences fortraining a language model suitable to a specific usage from the corpus.The apparatus includes: a template storing means for storing a wordstring template preliminarily prepared for the specific usage, a wordstring extracting means for extracting from the corpus a word stringpattern matching with the word string template stored in the templatestoring means, a transformation means for transforming the word stringpattern extracted by the word string extracting means on the basis of atransformational rule preliminarily prepared for generating word stringsin a natural language having a form along with a preliminarily selectedpurpose, and a training means for training the language model using wordstrings output from the transformation means as training data.

Japanese patent JP2012-83543A describes a language model generatingdevice including: a corpus analyzing means for analyzing text in acorpus including a set of world wide web (web) pages, an extractingmeans for extracting at least one word appropriate for a document typeset according to a speech recognition target based on an analysis resultby the corpus analyzing means, a word set generating means forgenerating a word set from the at least one word extracted by theextracting means, a web page acquiring means for causing a retrievalengine to perform a retrieval process using the word set generated bythe word set generating means as a retrieval query of the retrievalengine on the Internet and acquiring a web page linked from theretrieval result, and a language model generating means for generating alanguage model for speech recognition from the web page acquired by theweb page acquiring means.

David Guthrie et al., “A Closer Look at Skip-gram Modelling” describes amethod of using skip-grams for solving the problem of data sparsity(Abstract). As indicated in “2-skip-bi-grams” and “2-skip-tri-grams”described in the section of “2. Defining skip-grams” on page 1222,according to skip-grams, one word in a word string is deleted, wordsbefore and after the deleted word are caused to be adjacent to eachother, thereby making a bi-gram and a tri-gram.

SUMMARY OF THE INVENTION

The present invention provides a method of selecting training text for alanguage model, a computer for selecting training text for a languagemodel, and a computer program for selecting training text for a languagemodel and a computer program product therefor. Furthermore, the presentinvention provides a method of training a language model, a computer fortraining a language model, and a computer program for training alanguage model and a computer program product therefor.

In one embodiment of the present invention, a computer-implementedmethod of selecting training text for a language model is provided. Themethod includes: generating a template for selecting training text froma corpus in a first domain by replacing one or more words in a wordstring selected from the corpus in the first domain with a specialsymbol representing any word or word string and adopting the word stringreplaced with the special symbol as a template for selecting thetraining text; and selecting text covered by the template as thetraining text from a corpus in a second domain different from the firstdomain.

In another embodiment of the present invention, a computer-implementedmethod of selecting training text for a language model is provided. Themethod includes: generating a template for selecting training text froma corpus in a first domain by adopting the word string selected from thecorpus in the first domain as the template for selecting the trainingtext; and selecting text covered by the template as the training textfrom a corpus in a second domain different from the first domain.

In another embodiment of the present invention, a computer for selectingtraining text for a language model is provided. The computer includes: atemplate generating unit for generating a template for selectingtraining text from a corpus in a first domain according to at least onegeneration technique of: (i) replacing one or more words in a wordstring selected from the corpus in the first domain with a specialsymbol representing any word or word string, and adopting the wordstring replaced with the special symbol as a template for selecting thetraining text; and/or (ii) adopting the word string selected from thecorpus in the first domain as the template for selecting the trainingtext. The computer further includes: a training text selecting unit ofselecting text covered by the template as the training text from acorpus in a second domain different from the first domain.

In another embodiment of the present invention, a computer for traininga language model is provided. The computer includes: a templategenerating unit for generating a template for selecting training textfrom a corpus in a first domain according to at least one generationtechnique of: (i) replacing one or more words in a word string selectedfrom the corpus in the first domain with a special symbol representingany word or word string, and adopting the word string replaced with thespecial symbol as a template for selecting the training text; and/or(ii) adopting the word string selected from the corpus in the firstdomain as the template for selecting the training text. The computerfurther includes: a training text selecting unit for selecting textcovered by the template or text having a coverage rate of at least aprescribed value as the training test from a corpus in a second domaindifferent from the first domain, the coverage rate being a rate coveredby the template; and a language model training unit for training thelanguage model using the selected text.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a diagram showing an example of a computer usable in anembodiment of the present invention;

FIG. 2A shows a diagram for the case where according to the embodimentof the present invention, one or more words in a word string selectedfrom a target field corpus (English) are replaced with a special symbol,and the word string after replacement is selected as a template forselecting training text;

FIG. 3A shows a diagram for the case where according to the embodimentof the present invention, the word string selected from the target fieldcorpus (English) is adopted as a template for selecting training text;

FIG. 4A shows a flowchart for a process of replacing one or more wordsin a word string selected from a target field corpus with a specialsymbol, and adopting the word string after replacement as a template forselecting training text, according to the embodiment of the presentinvention;

FIG. 4B shows a flowchart for a process of selecting text covered by thetemplate generated by the process shown in FIG. 4A as training text froman out-of-target field corpus, according to the embodiment of thepresent invention;

FIG. 5A shows a flowchart for a process of adopting a word stringselected from a target field corpus as a template for selecting trainingtext, according to the embodiment of the present invention;

FIG. 5B shows a flowchart for showing a process of selecting textcovered by the template generated in FIG. 5A as training text from theout-of-target field corpus, according to the embodiment of the presentinvention;

FIG. 6 shows a flowchart for a process of training a language modelusing the training text selected in the process in FIG. 4B or FIG. 5B,according to the embodiment of the present invention; and

FIG. 7 is a diagram showing an example of a functional block diagram ofa computer that preferably has a hardware configuration according toFIG. 1, and executes the embodiment of the present invention.

DETAILED DESCRIPTION OF PREFERRED EMBODIMENTS

The present invention has an object to provide a technique ofefficiently collecting a sentence similar to a sentence contained in atarget field corpus from an out-of-target-field corpus, which is acorpus in a field other than that of the target field corpus.Furthermore, the present invention provides a technique of collecting,from an out-of-target-field corpus, a sentence similar to a sentencecontained in a target field corpus without using a statistical modelestimated from the target field corpus. In addition, the presentinvention has a technique of collecting, from an out-of-target-fieldcorpus, a sentence similar to a sentence contained in a target fieldcorpus, irrespective of an unknown word, even if the unknown word is inthe sentence.

In a certain method of selecting a sentence from an out-of-target-fieldcorpus using a statistical model estimated from a corpus in a targetfield, a sentence having a high generation probability may be selectedfrom the out-of-target-field corpus on the basis of the statisticalmodel. The selection based on the statistical model can sufficientlyfunction in the case of a small vocabulary. Unfortunately, the number ofvocabulary items has recently become enormous (e.g., a vocabularyincluding at least one million items at the maximum), and a languagemodel is required to be trained using the large vocabulary. Accordingly,selection of sentences having a high generation probability from theout-of-target-field corpus does not sufficiently function. For instance,in the case of an essentially related sentence, only the presence of anunknown word significantly reduces the probability for the sentence.

For instance, a corpus in the target field including one sentence thatis “Arrived at Tokyo now” (which is an English sentence) is discussed.It is assumed that an out-of-target-field corpus contains a sentence,“Arrived at Boston now”, similar to the previous sentence. In this case,the out-of-target-field corpus contains the sentence, “Arrived at Bostonnow”, but the corpus in the target field does not include “Boston”.Accordingly, a language model estimated from “Arrived at Tokyo now”provides a significantly low generation probability with respect to thesentence, “Arrived at Boston now” contained in the out-of-target-fieldcorpus, because of the large size of vocabulary.

In one embodiment of the present invention, the step of selecting thetext covered by the template includes: generating a word stringaccording to the same generation technique as the generation techniquefor the generated template with respect to each sentence of the corpusin the second domain; and selecting text covered by the template as thetraining text from the corpus in the second domain using the word stringgenerated according to the same generation technique and the generatedtemplate.

In one embodiment of the present invention, the step of selecting thetext covered by the template includes: generating a word stringaccording to the same generation technique as the generation techniquefor the generated template with respect to each sentence in the corpusin the second domain; calculating a coverage rate of the word stringgenerated according to the same generation technique being covered bythe generated template; and selecting a sentence having the calculatedcoverage rate of at least a prescribed value as the training text.

In one embodiment of the present invention, the step of generating thetemplate further includes: a step of extracting a template occurringmore than prescribed times from among the generated templates.Furthermore, the step of selecting the text covered by the templateincludes: a step of selecting text covered by the template extractedfrom the corpus in the second domain as the training text.

In one embodiment of the present invention, the step of selecting thetext covered by the template includes: generating a word stringaccording to the same generation technique as the generation techniquefor the extracted template with respect to each sentence in the corpusin the second domain; and selecting the text covered by the template asthe training text from the corpus in the second domain different fromthe first domain using the word string generated according to the samegeneration technique and the extracted template.

In one embodiment of the present invention, the step of selecting thetext covered by the template may include the steps of: generating a wordstring according to the same generation technique as the generationtechnique for the extracted template with respect to each sentence inthe corpus in the second domain; calculating a coverage rate of the wordstring generated according to the same generation technique beingcovered by the extracted template; and selecting a sentence having thecalculated coverage rate of at least a prescribed value as the trainingtext.

In one embodiment of the present invention, the training text selectingunit may generate a word string according to the same generationtechnique as the generation technique for the template generated by thetemplate generating unit with respect to each sentence of the corpus inthe second domain; and select text covered by the template as thetraining text from the corpus in the second domain different from thefirst domain using the word string generated according to the samegeneration technique and the generated template.

In one embodiment of the present invention, the training text selectingunit may generate a word string according to the same generationtechnique as the generation technique for the generated template withrespect to each sentence in the corpus in the second domain; calculate acoverage rate of the word string generated according to the samegeneration technique being covered by the generated template; and selecta sentence having the calculated coverage rate of at least a prescribedvalue as the training text.

In one embodiment of the present invention, the template generating unitmay further extract a template occurring more than prescribed times fromamong the generated templates, and the training text selecting unit mayselect text covered by the template from the second domain as thetraining text.

In one embodiment of the present invention, the training text selectingunit may generate a word string according to the same generationtechnique as the generation technique for the extracted template withrespect to each sentence in the corpus in the second domain; and selectthe text covered by the template as the training text from the corpus inthe second domain different from the first domain using the word stringgenerated according to the same generation technique as the generationtechnique for the extracted template.

In one embodiment of the present invention, the training text selectingunit may generate a word string according to the same generationtechnique as the generation technique for the extracted template withrespect to each sentence in the corpus in the second domain; calculate acoverage rate of the word string generated according to the samegeneration technique being covered by the extracted template; and selecta sentence having the calculated coverage rate of at least a prescribedvalue as the training text.

In a third embodiment of the present invention, a computer program and acomputer program product cause a computer to execute each step of themethod of selecting training text for a language model according to thefirst embodiment of the present invention.

In a fourth embodiment of the present invention, a method of training alanguage model executed by a computer includes the steps of: accordingto the method of selecting the training text for the language modelaccording to the first embodiment of the present invention, generating atemplate for selecting the training text for the language model from thecorpus in the first domain according to the method of selecting trainingtext for a language model according to the first embodiment of thepresent invention, and selecting, as the training text, text covered bythe template or text having a coverage rate of at least a prescribedvalue from the corpus in the second domain different from the firstdomain, the coverage rate being a rate covered by the template; andtraining the language model using the selected training text.

In a fifth embodiment of the present invention, a computer for traininga language model includes the template generating unit and the trainingtext selecting unit that are included in the computer according to thesecond embodiment of the present invention, and further includes alanguage model training unit of training the language model using theselected training text.

In a sixth embodiment of the present invention, a computer program and acomputer program product cause a computer to execute each step of themethod of training a language model according to the fourth embodimentof the present invention.

A computer program according to an embodiment of the present inventionmay be stored in any of computer-readable recording media, such as oneor more of a flexible disk, MO, CD, DVD, BD, hard disk device,USB-connectable memory medium, ROM, MRAM, and RAM. The computer programmay be downloaded from another data processing system, e.g., a computer,which is connected by a communication line, for being stored in therecording medium, or copied from another recording medium. The computerprogram according to the exemplary embodiment of the present inventionmay be compressed, or divided into multiple segments, and stored in asingle or multiple recording media. It should be noted that it is amatter of course that computer program products according to exemplaryembodiments of the present invention can be provided in various forms.The computer program product according to the exemplary embodiment ofthe present invention may include, for instance, a storing medium thatstores the computer program, and a transmission medium that transmitsthe computer program.

The summary of the present invention does not exhaustively list all thenecessary characteristics of the present invention. It should be notedthat a combination or a subcombination of these configuration elementsmay also configure the present invention.

It is a matter of course that various modifications where hardwareconfiguration elements of a computer used in an embodiment of thepresent invention are combined with multiple machines, and functions aredistributed thereto may be easily assumed by those skilled in the art.These modifications are concepts involved in the spirit of the presentinvention as a matter of course. However, these configuration elementsare only exemplified examples. Not all these configuration elements arethe necessary configuration elements of the present invention.

The present invention may be implemented as hardware, software, and acombination of hardware and software. In execution through thecombination of hardware and software, a typical example may be executionof the computer program in a computer where the computer program isinstalled. In such a case, the computer program is loaded into memory ofthe computer and executed, thereby allowing the computer program tocontrol the computer and execute the processes according to the presentinvention. The computer program may include any language, code, or agroup of instructions that can be expressed through representation. Sucha group of instructions enables the computer to directly execute aspecific function, or, after execution of one or both of 1. conversioninto another language, code or representation, and 2. copying to anothermedium, to execute the specific function.

According to the embodiment of the present invention, as a sentencesimilar to a sentence contained in the target field corpus, a sentenceefficiently covered by the template generated from the target fieldcorpus can be selected from the out-of-target-field corpus. Therefore,according to the embodiment of the present invention, a technique ofefficiently collecting the sentence similar to the sentence contained inthe target field corpus from the out-of-target-field corpus that is acorpus in a field other than that of the target field corpus can beprovided.

Furthermore, according to the embodiment of the present invention, thesentence similar to the sentence contained in the target field corpuscan be collected from the out-of-target-field corpus without using astatistical model estimated from the target field corpus.

Moreover, according to the embodiment of the present invention, even ifthere is an unknown word in a sentence, the sentence similar to thesentence contained in the target field corpus can be collected from theout-of-target-field corpus, irrespective of the unknown word.

Exemplary embodiments of the present invention are hereinafter describedwith reference to the drawings. Throughout the following drawings, thesame symbols denote the same objects unless otherwise noted. Theexemplary embodiments of the present invention are for illustrating apreferred embodiment of the present invention. It should be understoodthat there is no intention to limit the scope of the present inventionto that shown here.

For the varying embodiments of the present invention, “a corpus in afirst domain” may be, for instance, a target field corpus. The “targetfield corpus” is a corpus in a field that is an object of an application(e.g., automatic speech recognition application, machine translationapplication, natural language processing application, optical characterrecognition (OCR) application), and particularly, a corpus in a fieldthat is an object of an automatic speech recognition application. The“target field corpus” may be referred to as in-domain corpora.

In the embodiments of the present invention, a “corpus in a seconddomain” may be an out-of-target field corpus. The “out-of-target fieldcorpora” are from a different field as the target of the application anda large amount of which contains corpora of documents which can berelatively easily collected. For instance, the corpora of the documentsmay be newspapers, crawled web text, or corpora of the social networkingservices. The “out-of-target field corpus” is also referred to as anout-of-domain corpora or general corpora.

In the embodiments of the present invention, a “language model” can be alanguage model based on word n-gram. According to the word n-gram, anobject is segmented by units of words (e.g., in a language havingword-segmentation-marks such as English) and a model is made accordingto units each including an arrangement of sequential n words. Forscenarios where the value of n is one, two or three, the terms“unigram”, “bigram”, and “trigram” are used, respectively. In theembodiments of the present invention, word n-gram is typically word2-gram, word 3-gram, or word 4-gram.

In the embodiments of the present invention, a “word string” can referto any of: a word string selected from a corpus in the first domain, aword string where one or more words in the word string selected from thecorpus in the first domain are replaced with a special symbolrepresenting any word or word string, a word string selected from acorpus in a second domain, or a word string where one or more words inthe word string selected from the corpus in the second domain arereplaced with a special symbol representing any word or word string.Words in the word string can include BOS (“begin of sentence”) and EOS(“end of sentence”).

In the embodiments of the present invention, the “special symbolrepresenting any word or word string” can be a wild card.

In an embodiment of the present invention, the “template” can be a wordstring subjected to replacement where one or more words in the wordstring selected from a corpus in the first domain are replaced with aspecial symbol. The special symbol can represent any word or wordstring, or a word string itself selected from the corpus in the firstdomain. In particular, the “template” may be acquired by replacing oneor more words in a word string selected from the corpus in the firstdomain with the special symbol.

FIG. 1 is a diagram showing an example of a hardware configuration for acomputer usable in an embodiment of the present invention. Computer(101) according to an embodiment of the present invention includes oneor multiple computers. The multiple computers may have differenthardware or software or different combinations of hardware and software.The multiple computers may be connected to each other directly or via anetwork. Computer (101) is not necessarily a physical computer, and canbe a virtual machine realized on a computer installed in a data centeror a cloud environment (e.g., SoftLayer® provided by InternationalBusiness Machines Corporation®).

Computer (101) may be a desktop computer, a notebook computer,ultrabook, or a server computer. Computer (101) includes CPU (102) andmain memory (103), which are connected to bus (104). Preferably, CPU(102) is based on a 32-bit or 64-bit architecture. CPU (102) may beCore™ i series, Core™ 2 series, Atom™ series, Xeon® series, Pentium®series or Celeron® series by Intel Corporation, A series, Phenom™series, Athlon™ series, Turion™ series or Sempron™ series by AMD(Advanced Micro Devices), Inc., or Power™ series by InternationalBusiness Machines Corporation.

Display (106) (e.g., a liquid crystal display (“LCD”)) can be connectedto bus (104) via display controller (105). The LCD can be a touch paneldisplay or a floating touch display. Display (106) may be used fordisplaying information that is displayed through operation of softwarecurrently operating on computer (101).

Keyboard (111) and mouse (112) can be optionally connected to bus (104)via peripheral device controller (110) (e.g., a keyboard and mousecontroller or a USB bus).

Storing device (108) (e.g., a hard disk or a solid state drive (“SSD”))and/or drive (109) (e.g., a CD, DVD or BD drive) can be optionallyconnected to bus (104) via SATA or IDE controller (107). Storing device(108) may store an operating system such as Windows® OS, UNIX®, Linux®(e.g., RedHat®, Debian®), MacOS®, and Java® execution environment suchas J2EE, Java® application, Java® virtual machine (VM), a program thatprovides Java® just-in-time (JIT) complier, and various computerprograms, and data, in a manner loadable to main memory (103).

Storing device (108) may be embedded in computer (101), connected via acable (e.g. USB cable) or a wired or wireless network in a mannerallowing computer (101) to access this device.

Drive (109) may be used for installing an operating system program or anapplication program into storing device (108) from a CD-ROM, DVD-ROM orBD, as necessary.

Communication interface (114) is in conformity with the Ethernet®protocol. Communication interface (114) is connected to bus (104) viacommunication controller (113), plays a role of connecting computer(101) to communication line (115) in a wired or wireless manner, andprovides a network interface layer for the TCP/IP communication protocolof a communication function of the operating system of computer (101).The communication line may be a wired LAN environment in conformity withwired LAN connection standards, or a wireless LAN environment inconformity with wireless LAN connection standards (e.g., a Wi-Fiwireless LAN environment, such as IEEE802.11a/b/g/n), or a mobile phonenetwork environment (e.g., 3G or 4G/LTE environment).

Computer (101) can receive data from another apparatus (e.g., anothercomputer, server computer, or a network attached storage) viacommunication line (115), and store the data in storing device (108).

Referring to FIG. 2A, an embodiment of the present invention is shown asa diagram for replacing one or more words in a word string selected froma target field corpus with a special symbol. Then, adopting the wordstring replaced with the special symbol as the template for selectingtraining text, and selecting text covered by the template as trainingtext for a language model from an out-of-target field corpus.

Furthermore, FIG. 2A shows an example of a case where sentences storedin the target field corpus is in English. In step 201, computer (101)takes one English language sentence, “He arrived at Tokyo now”, fromtarget field corpus (221). Computer (101) removes periods in thesentence, otherwise periods will be treated as normal words.

In step 202, computer (101) adds a symbol <bos> indicating BOS beforethe sentence taken from target field corpus (221), and adds a symbol<eos> indicating EOS at the end of the sentence. The resulting sentenceis “<bos> He arrived at Tokyo now <eos>”.

In step 203, computer (101) segments the sentence “<bos> He arrived atTokyo now <eos>” into words and then lists word 3-gram as a unit. Inother words, Computer (101) selects a word string that includes threewords from the sentence “<bos> He arrived at Tokyo now <eos>” whileshifting word-by-word such that the word string is generated as asegmented result into the word 3-gram unit is as follows: “<bos> Hearrived”, “He arrived at”, “arrived at Tokyo”, “at Tokyo now”, “Tokyonow <eos>”. In the segmentation to the word 3-gram unit, each of thesymbols <bos> and <eos> are treated as one word.

In step 203, computer (101) replaces the word in the middle of eachsegmented word 3-gram word string unit with a special symbol (e.g.,asterisk) representing any word. The partially blanked word stringgenerated as the result of the replacement is as follows: “<bos>*arrived”, “He * at”, “arrived * Tokyo”, “at * now”, “Tokyo * <eos>”.Accordingly, the resulting word string may be referred to as a partiallyblanked word string due to the partially blanked word 3-gram.

Computer (101) repeatedly performs steps 201 to 203 for all sentencesthat are taken from target field corpus (221) and other than theaforementioned sentence.

In step 204, computer (101) adopts, as a template for selecting trainingtext, the word string generated as the result of the replacement.Computer (101) can optionally extract and acquire the template having ahigh number of occurrences from among the templates generated in step204 by the repeated execution of steps 201 to 203 for all the sentencesin target field corpus (221).

In the following description, it is assumed that all the templatesacquired in step 204 are used.

In step 211, computer (101) takes the English language sentence “Hearrived at Boston now” from out-of-target field corpus (223). Computer(101) then removes the period in the sentence as performed in step 201.If the period is not removed in step 201, computer (101) does not removethe period in the sentence.

In step 212, as with the process described in the foregoing step 202,computer (101) adds the symbol “<bos>” indicating BOS before thesentence taken from out-of-target field corpus (223), and adds thesymbol “<eos>” indicating EOS at the end of the sentence. The resultingsentence is “<bos> He arrived at Boston now <eos>”.

In step 213, computer (101) segments the sentence “He arrived at Bostonnow” into words and then lists word 3-gram units included in the resultas described in step 203. The word string generated results in thesegmented word 3-gram units as follows: “<bos> He arrived”, “He arrivedat”, “arrived at Boston”, “at Boston now”, “Boston now <eos>”.

In step 213, computer (101) replaces the word in the middle of eachsegmented word 3-gram word string unit with a special symbol (e.g.,asterisk) representing any word. The partially blanked word stringgenerated as the result of the replacement is as follows: “<bos>*arrived”, “He * at”, “arrived * Boston”, “at * now”, “Boston * <eos>”.

In step 214, computer (101) determines whether the partially blankedword string generated in step 213 is covered by the template generatedin step 204. That is, computer (101) determines whether the partiallyblanked word string generated in step 213 matches with the templategenerated in step 204. As shown in FIG. 2A, three partially blanked wordstrings, “<bos>* arrived”, “He * at”, and “at * now”, among fivepartially blanked word strings match with the template.

In step 215, computer (101) calculates the coverage rate of thepartially blanked word string generated in step 213 being covered by thetemplate generated in step 204. As described above, the three partiallyblanked word strings among the five partially blanked word strings matchwith the template. Accordingly, the coverage rate is 60% (3/5×100).

In step 216, computer (101) selects a sentence having a coverage rate ofat least a prescribed value as training text. Here, it is assumed thatthe setting is configured such that a sentence having a coverage rate ofat least 50% is selected as training text. Accordingly, since thecoverage rate for the sentence “He arrived at Tokyo now” is 60%,computer (101) selects the sentence “He arrived at Tokyo now” astraining text. The sentence selected as training text is usable fortraining a language model. The sentence selected from out-of-targetfield corpus (223) is new training text that is not in target fieldcorpus (221) in consideration of training the language model.

Referring to FIG. 3A, a diagram for adopting a word string selected froma target field corpus as a template for selecting training text, andselecting text covered by the template as training text for a languagemodel is shown.

FIG. 3A shows an example of a case where sentences stored in the targetfield corpus are in English.

In step 301, computer (101) takes an English language sentence “Hearrived at Tokyo now” from target field corpus (321). Computer (101)removes the period in the sentence. Alternatively, if the period is notremoved, the period is treated as one word as with a normal word.

In step 302, computer (101) adds a symbol “<bos>” indicating BOS beforethe sentence taken from target field corpus (321), and adds a symbol“<eos>” indicating EOS at the end of the sentence. The resultingsentence is “<bos> He arrived at Tokyo now <eos>”.

In step 303, computer (101) segments the sentence “He arrived at Tokyonow” into words and then lists word 2-gram units included in the result.That is, computer (101) selects a word string that includes two wordsfrom the sentence “He arrived at Tokyo now” while shifting word-by-word.The word string generated results in segmented word 2-gram units asfollows: “<bos> He”, “He arrived”, “arrived at”, “at Tokyo”, “Tokyonow”, “now <eos>”.

As shown in the result, the segmentation to word 2-gram units treatseach of the symbols <bos> and <eos> as single words.

Computer (101) repeatedly performs steps 301 to 303 for each of thesentences that are taken from target field corpus (321).

In step 304, computer (101) adopts the generated word string as atemplate for selecting training text. Computer (101) can optionallyextract the template that has a higher number of occurrences of the sameword string as that of the template than a prescribed number from amongthe templates in step 304, on the basis of the result of repeatedlyexecuted steps 301 to 303 for each of all the sentences in target fieldcorpus (321). That is, computer (101) can extract templates having thehigher number of occurrences than the prescribed number from among thetemplates in step 304.

In the following description, it is assumed that all of the templatesthat are acquired in step 304 are used.

In step 311, computer (101) takes the English language sentence “Hearrived at Boston now” from out-of-target field corpus (323). Computer(101) then removes the period in the sentence according step 301. If theperiod is not removed in step 301, the computer (101) does not removethe period in the sentence.

In step 312, as with step 302, computer (101) adds the symbol “<bos>”indicating BOS before the sentence taken from out-of-target field corpus(323), and adds the symbol “<eos>” indicating EOS at the end of thesentence. The resulting sentence is: “<bos> He arrived at Boston now<eos>”.

In step 313, computer (101) segments the sentence “He arrived at Bostonnow” into words and then lists word 2-gram units included in the resultas in step 303. The word string generated results in segmented word2-gram units as follows: “<bos> He”, “He arrived”, “arrived at”, “atBoston”, “Boston now”, “now <eos>”.

In step 314, computer (101) determines whether the word string generatedin step 313 is covered by the template generated in step 304. That is,computer (101) determines whether the word string generated in step 313matches with the template generated in step 304. As shown in FIG. 3A,four word strings (“<bos> He”, “He arrived”, “arrived at”, and “now<eos>”) among six word strings match with the template.

In step 315, computer (101) calculates the coverage rate of the wordstring generated in step 313 being covered by the template generated instep 304. As described above, the four word strings among the six wordstrings match with the template. Accordingly, the coverage rate is about67% (=(4/6)×100).

In step 316, computer (101) selects a sentence having a coverage rate ofat least a prescribed value as training text. Here, it is assumed thatthe setting is configured such that a sentence having a coverage rate ofat least 60% is selected as training text. Accordingly, since thecoverage rate for the sentence “He arrived at Tokyo now” is 67%,computer (101) selects the sentence “He arrived at Tokyo now” astraining text. The sentence selected as training text is usable fortraining a language model. The sentence selected from out-of-targetfield corpus (323) is new training text that is not in target fieldcorpus (321) in consideration of training the language model.

FIG. 4A shows a flowchart for a process of replacing one or more wordsin a word string selected from a target field corpus with a specialsymbol, and adopting the word string after replacement as a template forselecting training text, according to the embodiment of the presentinvention. FIG. 4B shows a flowchart for a process of selecting textcovered by the template generated as training text from an out-of-targetfield corpus, according to the embodiment of the present invention.

In step 401, computer (101) starts a process of replacing one or morewords in a word string selected from target field corpus (491) with aspecial symbol, and adopting the word string replaced with the specialsymbol as a template for selecting training text.

In step 402, computer (101) selects one sentence that includes a wordstring from target field corpus (491). Computer (101) may remove theperiod and punctuation marks from the sentence taken from target fieldcorpus (491). Alternatively, if the punctuation marks are not removed,each punctuation mark is treated as one word. The timing of removing thepunctuation marks may be after execution of word segmentation in thefollowing step 405. For instance, in the case where the wordsegmentation in step 405 is performed statistically, if the model forword segmentation is trained without punctuation marks, it is preferredthat the punctuation marks be removed before execution of the wordsegmentation. On the contrary, if the model for word segmentation istrained with the punctuation marks, it is preferred that the punctuationmarks be removed after execution of the word segmentation.

In step 403, computer (101) determines whether to add the symbolrepresenting BOS (e.g., <bos>) before the sentence selected in step 502or the sentence from which the period and punctuation mark have beenremoved, and add the symbol representing EOS (e.g., <eos>) at the end ofthe sentence or not. Computer (101) advances the processing to step 404according to the symbol being added. On the contrary, computer (101)advances the processing to step 405 according to the symbol being notadded.

In step 404, computer (101) adds the symbol representing BOS before thesentence selected in step 402 or the sentence from which the period andpunctuation mark have been removed, and adds the symbol representing EOSat the end of the sentence.

Note that in the flowchart shown in FIG. 4A, processes of steps 403 and404 may be preliminarily omitted.

In step 405, computer (101) generates a template for selecting trainingtext from among word strings in a sentence in target field corpus (491)or a sentence subjected to a process of step 404 (hereinafter, referredto as a “sentence selected from target field corpus (491)”; the selectedsentence is also a word string). Computer (101) replaces one or morewords in the word strings in the sentence selected from target fieldcorpus (491) with a special symbol representing any word or word string,and generates a word string replaced with the special symbol. Computer(101) then adopts the word string after replacement as the template.

Replacement of one or more words in the word string with the specialsymbol representing any word or word string may be on a word at anyposition in the sentence selected from target field corpus (491). Forinstance, the word at any position may be one or more words from thebeginning of the selected word string; one or more words between thefirst word and the last word in the selected word string; or one or morewords from the end of the selected word string.

In step 405, computer (101) can segment the sentence selected fromtarget field corpus (491) into words, and then list word n-gram includedin the result as a unit. Instead of word segmentation, morphologicalanalysis may be performed for the sentence. The morphological analysisis a more advanced process that assigns parts of speech at the same timeof the word segmentation. Since parts of speech are not required in thisembodiment of the present invention, only the process of wordsegmentation is sufficient. Here, in the word n-gram, n may be two tofour. In particular, n may be two or three. That is, computer (101)selects word strings each including n words from the sentence selectedfrom target field corpus (491) while shifting word-by-word. If the wordstring contains the special symbol in the segmentation to the units ofword n-gram, the special symbol is processed as one word. If the wordstring contains a period or a punctuation mark in the segmentation tounits of word n-gram, each period and punctuation mark is processed asone word. Computer (101) then replaces one or more words in the wordstring generated as the segmented result of the segmentation to theunits of word n-gram with a special symbol representing any word or wordstring. In the word string replaced with the special symbol, one word inthe word string generated as the result of the segmentation to the unitsof the word n-gram is replaced with the special symbol. Accordingly, thestring may also be referred to as a partially blanked word string due topartially blanked word n-gram. That is, in word n-gram for any n, wheren is an integer, the position at the middle or the beginning or the end(in particular, at the middle) may be blanked.

In step 406, computer (101) determines whether there is any sentence towhich processes of steps 402 to 405 have not been applied yet in targetfield corpus (491). Computer (101) returns the processing to step 402 ifthere is a sentence having not been subjected to the processes yet, andrepeats steps 402 to 406. On the contrary, computer (101) advances theprocessing to step 407 if all sentences have been subjected to theprocesses.

According to the repetition of steps 402 to 406, computer (101) cancalculate the frequency of occurrence of the template generated in step405 using a counter. Furthermore, computer (101) may associate thetemplate generated in step 405 with the occurrence frequency.

In step 407, computer (101) extracts templates where the same wordstring as that of the template occurs more than the prescribed times,from among the templates generated in step 405.

If the prescribed number is set to one, computer (101) extracts all thetemplates generated in step 405.

Furthermore, in step 407, computer (101) can store the extractedtemplates in recording medium (492) that stores the templates.

Note that in the flowchart shown in FIG. 4A, the template extractionprocess shown in step 407 may be preliminarily omitted.

In step 408, computer (101) finishes the processes that replace one ormore words in the word string selected from the target field corpus withthe special symbol, and adopt the word string replaced with the specialsymbol as the template for selecting the training text.

Referring to FIG. 4B, the process of selecting training text forlanguage model according to the present invention is shown.

In step 411, computer (101) starts a process of selecting, fromout-of-target field corpus (493), text covered by the template generatedin step 405 of FIG. 4A or the template extracted in step 407 as trainingtext for a language model.

In step 412, computer (101) selects one sentence from out-of-targetfield corpus (493). Computer (101) may remove a period or a punctuationmark in the sentence taken from out-of-target field corpus (493),according to the removal of the period or punctuation mark in step 402.

In step 413, as with the foregoing step 403, computer (101) determineswhether or not to add the symbol representing BOS before the sentenceselected in step 412 or the sentence from which the period andpunctuation mark have been removed, and add the symbol representing EOSat the end of the sentence. Computer (101) advances the processing tostep 414 according to a fact that the symbols have been added in step403. On the contrary, computer (101) advances the processing to step 415if the symbols have not been added in step 403.

In step 414, computer (101) adds the symbol representing BOS before thesentence selected in step 412 or the sentence from which the period andpunctuation mark have.

If the processes of steps 403 and 404 shown in FIG. 4A are preliminarilyomitted, processes of steps 413 and 414 are preliminarily omitted alsoas in the flowchart shown in FIG. 4B in an analogous manner.

In step 415, computer (101) generates a word string according to thesame generation technique as the technique of generating the templateshown in step 405 of FIG. 4A. That is, computer (101) can segment thesentence in out-of-target field corpus (493) or the sentence subjectedto the process of step 414 (hereinafter, referred to as the “sentenceselected from out-of-target field corpus (493)) into words, and thenlist the word units according to word n-gram included in the result.Here, in the case of the word n-gram, n is the same value as that instep 405.

Subsequently, as described with reference to step 405 of FIG. 4A, instep 415 computer (101) replaces one or more words in the word stringgenerated as the segmented result of the segmentation to the units ofword n-gram with the special symbol representing any word or word stringand thus generates the word string replaced with the special symbol.

In step 416, computer (101) reads the template generated in step 405 ofFIG. 4A or the template extracted in step 407 from recording medium(492) that stores the templates, and then calculates the coverage rateof the word string generated in step 415 being covered by the templateread from recording medium (492). The coverage of the word string withthe template is that this word string matches with the word string inthe template. Note that if the template contains a special symbol (e.g.,asterisk) representing any word, the character in the word stringcorresponding to the special symbol in the template may be any word.Computer (101) may not only simply calculate the coverage rate but alsoprovide degrees of importance for the respective templates and use theweighted coverage rate based on the degree of importance. For instance,the degree of importance may be set based on how frequently the wordstring occurs in target field corpus (491). In the calculation of thecoverage rate, computer (101) lists the word strings from out-of-targetfield corpus (493) using the same generation technique as that forextracting the template, and checks whether the listed word strings arecovered by the template or not. The numbers of denominators forcalculating the coverage rates are determined on the basis of thesentences as the embodiment of out-of-target field corpus (493).Accordingly, in the calculation of the coverage rate, the case where thesentence contained in target field corpus (491) has a length differentfrom the length of the sentence contained in out-of-target field corpus(493) causes no problem.

In step 417, computer (101) selects the sentence having the coveragerate calculated in step 417 of at least a prescribed value as trainingtext for a language model. Computer (101) may store the training text ina recording medium (494) that stores the training text.

In step 418, Computer (101) determines whether or not there is anysentence having not been subjected to the processes of steps 412 to 417yet in out-of-target field corpus (493). According to a fact that thereis a sentence having not been subjected to the processes yet, computer(101) returns the processing to step 412 and repeats steps 412 to step418. On the contrary, according to a fact that there is no sentencehaving not been subjected to the processes yet, computer (101) advancesthe processing to a finish step 419.

In step 419, computer (101) finishes the process of selecting thetemplate from the training text for the language model from theout-of-target field corpus.

FIG. 5A and FIG. 5B show a flowchart for a process of adopting the wordstring selected from the target field corpus as a template for selectingtraining text, and a flowchart for a process of selecting, from theout-of-target field corpus, text covered by the generated template asthe training text for the language model, respectively, according to theembodiment of the present invention.

In step 501, computer (101) starts a process of adopting the word stringselected from target field corpus (591) as a template for selectingtraining text.

In step 502, computer (101) selects one sentence (including a wordstring) from target field corpus (591). Computer (101) may remove theperiod and punctuation marks from the sentence taken from target fieldcorpus (591). Alternatively, computer (101) does not necessarily removethe period. If the punctuation marks are not removed, each of thepunctuation marks is treated as one word as with a normal word. Thetiming of removing the punctuation marks may be after execution of wordsegmentation in the following step 505. For instance, in the case wherethe word segmentation in step 505 is performed statistically, if themodel for word segmentation is trained without punctuation marks, it ispreferred that the punctuation marks be removed before execution of theword segmentation. On the contrary, if the model for word segmentationis trained with the punctuation marks, it is preferred that thepunctuation marks be removed after execution of the word segmentation.

In step 503, computer (101) determines whether to add the symbolrepresenting BOS (e.g., <bos>) before the sentence selected in step 502or the sentence from which the full stop and punctuation mark have beenremoved, and add the symbol representing EOS (e.g., <eos>) at the end ofthe sentence or not. Computer (101) advances the processing to step 504according the symbol being added. On the contrary, computer (101)advances the processing to step 505 according to the symbol being notadded.

In step 504, computer (101) adds the symbol representing BOS before thesentence selected in step 502 or the sentence from which the full stopand punctuation mark have been removed, and adds the symbol representingEOS at the end of the sentence.

Note that in the flowchart shown in FIG. 5A, the processes of steps 503and 504 may be preliminarily omitted.

In step 505, computer (101) generates a template for selecting trainingtext from the sentence in target field corpus (591) or the sentencesubjected to the process of step 504 (hereinafter, referred to as a“sentence selected from target field corpus (591)”; the selectedsentence is also a word string). Computer (101) adopts the sentenceselected from target field corpus (591) as the template.

In step 505, computer (101) can segment the sentence selected fromtarget field corpus (591) into words, and then list word n-gram includedin the result as a unit. Instead of word segmentation, morphologicalanalysis may be performed for the sentence. The morphological analysisis a more advanced process that assigns parts of speech at the same timeof the word segmentation. Since parts of speech are not required in theembodiment of the present invention, the process of word segmentation issufficient. Here, in the word n-gram, n is, for instance, two to four.In particular, n may be two or three. That is, computer (101) selectsword strings each including n words from the sentence selected fromtarget field corpus (591) and adopts the strings as a template whileshifting word-by-word. If the word string contains the special symbol inthe segmentation to the units of word n-gram, the special symbol isprocessed as one word. If the word string contains the period orpunctuation mark in the segmentation to units of word n-gram, each ofthe period and the punctuation marks is processed as one word.

In step 506, computer (101) determines whether there is any sentence towhich the processes of steps 502 to 505 have not been applied yet intarget field corpus (591) or not. Computer (101) returns the processingto step 502 according to a fact that there is a sentence having not beensubjected to the processes yet, and repeats steps 502 to 506. On thecontrary, computer (101) advances the processing to step 507 accordingto a fact that there is no sentence having not been subjected to theprocesses yet.

According to repetition of steps 502 to 506, computer (101) cancalculate the frequency of occurrence of the template generated in step505 using, for instance, a counter. Furthermore, computer (101) mayassociate the template generated in step 505 with the occurrencefrequency.

In step 507, computer (101) extracts templates where the same wordstring as that in the template occurs more than prescribed times, fromamong the templates generated in step 505.

If the prescribed number is set to one, computer (101) extracts all thetemplates generated in step 505.

In step 507, furthermore, computer (101) may store the extractedtemplates in recording medium (592) that stores the templates.

Note that in the flowchart shown in FIG. 5A, the template extractionprocess shown in step 507 may be preliminarily omitted.

In step 508, computer (101) finishes the process of adopting the wordstring selected from the target field corpus as the template forselecting the training text.

In step 511, computer (101) starts a process of selecting, fromout-of-target field corpus (593), text covered by the template generatedin step 505 in FIG. 5A or the template extracted in step 507 as trainingtext for a language model.

In step 512, computer (101) selects one sentence from out-of-targetfield corpus (593). Computer (101) may remove the full stop orpunctuation mark in the sentence taken from out-of-target field corpus(593), according to the removal of the full stop or punctuation mark instep 502.

In step 513, computer (101), as with the foregoing step 503, computer(101) determines whether or not to add the symbol representing BOSbefore the sentence selected in step 512 or the sentence from which thefull stop and punctuation mark have been removed, and add the symbolrepresenting EOS at the end of the sentence. Computer (101) advances theprocessing to step 514 according to a fact that the symbols have beenadded in step 503. On the contrary, computer (101) advances theprocessing to step 515 according to a fact that the symbols have notbeen added in step 503.

In step 514, computer (101) adds the symbol representing BOS before thesentence selected in step 512 or the sentence from which the full stopand punctuation mark have been removed, and adds the symbol representingEOS at the end of the sentence.

If the processes of steps 503 and 504 shown in FIG. 5A are preliminarilyomitted, processes of steps 513 and 514 are preliminarily omitted alsoin the flowchart shown in FIG. 5B in an analogous manner.

In step 515, computer (101) generates a word string according to thesame generation technique as the technique of generating the templateshown in step 505 of FIG. 5A. That is, computer (101) acquires a wordstring in the sentence in out-of-target field corpus (593), or thesentence subjected to the process of step 514 (hereinafter, referred toas a “sentence selected from out-of-target field corpus (593)”).

In step 515, for instance, computer (101) can segment the sentenceselected from out-of-target field corpus (593) into words, and then listword n-gram contained in the result. Here, in the word n-gram, n has thesame value as that in step 505. Computer (101) selects a word stringcontaining n words from the sentence selected from out-of-target fieldcorpus (593) while shifting word-by-word. If the word string containsthe special symbol in the segmentation to units of word n-gram, thespecial symbol is processed as one word. If the word string includes thefull stop or punctuation mark in the segmentation to units of wordn-gram, each of the full stop and the punctuation marks is processed asone word.

In step 516, computer (101) reads the template generated in step 505 ofFIG. 5A or the template extracted in step 507 from recording medium(592) that stores the templates, and then calculates the coverage rateof the word string generated in step 515 being covered by the templateread from recording medium (592). The coverage of the word string withthe template is that this word string matches with the word string inthe template. Note that if the template contains a special symbol (e.g.,asterisk) representing any word, the character in the word stringcorresponding to the special symbol in the template may be any word.Computer (101) may not only simply calculate the coverage rate but alsoprovide degrees of importance for the respective templates and use theweighted coverage rate based on the degree of importance. For instance,the degree of importance may be set based on how frequently the wordstring occurs in target field corpus (591). In the calculation of thecoverage rate, computer (101) lists the word strings from out-of-targetfield corpus (593) using the same generation technique as that forextracting the template, and checks whether the listed word strings arecovered by the template or not. The numbers of denominators forcalculating the coverage rates are determined on the basis of thesentences as the embodiment of out-of-target field corpus (593).Accordingly, in the calculation of the coverage rate, the case where thesentence contained in target field corpus (591) has a length differentfrom the length of the sentence contained in out-of-target field corpus(593) causes no problem.

In step 517, computer (101) selects the sentence having the coveragerate calculated in step 516 of at least a prescribed value as trainingtext for a language model. Computer (101) may store the training text inrecording medium (594) that stores the training text.

In step 518, computer (101) determines whether or not there is anysentence having not been subjected to the processes of steps 512 to 517yet in out-of-target field corpus (593). According to a fact that thereis a sentence having not been subjected to the processes yet, computer(101) returns the processing to step 512 and repeats steps 512 to step518. On the contrary, according to a fact that there is no sentencehaving not been subjected to the processes yet, computer (101) advancesthe processing to a finish step 519.

In step 519, computer (101) finishes the process of selecting, from theout-of-target field corpus, the text covered by the template as thetraining text for the language model.

FIG. 6 is a flowchart for a process of training a language model usingtraining text according to the embodiment of the present invention. Thecomputer that executes each step shown in FIG. 6 may be the same as ordifferent from the computer that executes each step in FIG. 4A and FIG.4B or the computer that executes each step in FIG. 5A and FIG. 5B.

In step 601, computer (101) starts a process of training a languagemodel using the training text selected by the process shown in FIG. 4B,the training text selected by the process shown in FIG. 5B, or acombination thereof (hereinafter, integrally referred to as “trainingtext”).

In step 602, computer (101) reads the training text from recordingmedium (694) that stores the training text, and trains the languagemodel using the read training text. Note that the training text fortraining the language model is also referred to as a training corpus.

Furthermore, in step 602, computer (101) may train the language modelbased on word n-gram from target field corpus (691). The method ofsegmenting the target field corpus into words to acquire segmented wordstrings can acquire word strings that can be acquired by a conventionalmethod known to those skilled in the art.

In step 603, computer (101) finishes the process of training thelanguage model using the training text.

FIG. 7 is a diagram showing an example of a functional block diagram ofa computer that preferably has a hardware configuration according toFIG. 1, and executes the embodiment of the present invention accordingto the flowcharts of FIGS. 4A and 4B or FIG. 5A and FIG. 5B, and FIG. 6.Hereinafter, “unit” may be replaced with “means”.

Computer (701) may correspond to computer (101) shown in FIG. 1.

Computer (701) may be an apparatus that executes each step of theflowcharts of FIG. 4A and FIG. 4B or FIG. 5A and FIG. 5B.

Computer (701) includes template generating unit (711), training textselecting unit (712) and, optionally, language model training unit(713).

Template generating unit (711) generates template (792) for selectingtraining text from a corpus that is target field corpus (791), accordingto at least one generation technique of (1) a generation technique ofreplacing one or more words in the word string selected from the corpusthat is target field corpus (791) with a special symbol representing anyword or word string, and adopting the word string replaced with thespecial symbol as template (792) for selecting training text, and (2) ageneration technique of adopting the word string selected from thecorpus that is target field corpus (791) as template (792) for selectingthe training text.

Template generating unit (711) can extract templates (792) that occurmore than prescribed times from among generated templates (792).

Template generating unit (711) can execute each step shown in FIG. 4Aand/or each step shown in FIG. 5A.

Training text selecting unit (712) selects text covered by template(792) as training text (794) from out-of-target field corpus (793)different from target field corpus (791).

Training text selecting unit (712) can generate a word string withrespect to each sentence in out-of-target field corpus (793) accordingto the same generation technique as the technique of generating template(792) generated by template generating unit (711), and select textcovered by template (792) as training text (794) from out-of-targetfield corpus (793) that is different from target field corpus (791),using the word string generated according to the same generationtechnique, and generated template (792).

Training text selecting unit (712) can generate a word string for eachsentence with respect to each sentence in out-of-target field corpus(793) according to the same generation technique as the technique ofgenerating generated template (792), calculate the coverage rate of theword string generated according to the same generation technique beingcovered by template (792), and select, as training text (794), sentenceshaving the calculated coverage rate of at least a prescribed value.

In the case of extracting templates (792) that occur more thanprescribed times from among templates (792) generated by templategenerating unit (711), training text selecting unit (712) can selecttext covered by extracted template (792) from out-of-target field corpus(793) as training text (794).

Training text selecting unit (712) can generate a word string withrespect to each sentence in out-of-target field corpus (793) accordingto the same generation technique as the technique of generatingextracted template (792), and select text covered by template (792) astraining text (794) from out-of-target field corpus (793) different fromtarget field corpus (791), using the word string generated according tothe same generation technique and extracted template (792).

Training text selecting unit (712) can generate a word string withrespect to each sentence in out-of-target field corpus (793) accordingto the same generation technique of the technique of generatingextracted template (792), calculate the coverage rate of the word stringgenerated according to the same generation technique being covered byextracted template (792), and select the sentences having the calculatedcoverage rate of at least the prescribed value as training text (794).

Training text selecting unit (712) can execute each step shown in FIG.4B and/or each step shown in FIG. 5B.

Language model training unit (713) trains the language model usingtraining text (794).

Language model training unit (713) can execute each step shown in FIG.6.

For example, text (target field corpus) transcribed by ear of a personfrom utterance on a task for automatic speech recognition was prepared.Computer (701) replaced, with a special symbol, one or more words in theword string selected from the prepared target field corpus, according tothe embodiment of the present invention, adopted the word stringreplaced with the special symbol as a template for selecting trainingtext. Computer (701) then selected text covered by the template as thetraining text for a language model from the out-of-target field corpus.

Furthermore, computer (701) segmented the prepared target field corpusinto words and acquired segmented word strings, according to aconventional technique known to those skilled in the art.

Computer (701) then trained the language model using the selectedtraining text and the segmented word strings acquired from the targetfield corpus. Computer (701) performed an automatic speech recognitionexperiment (Example) using the trained language model.

As a comparative example, computer (701) trained the same language modelas that of the previous example using only the segmented word stringsacquired from the target field corpus. Computer (701) performed anautomatic speech recognition experiment (comparative example) using thetrained language model.

As a result, the speech recognition based on Example was improved inerror rate by 0.75% in comparison with the speech recognition based onthe comparative example.

1. A computer-implemented method of selecting training text for alanguage model comprising the steps of: generating a template forselecting training text from a corpus in a first domain by replacing oneor more words in a word string selected from the corpus in the firstdomain with a special symbol representing any word or word string, andadopting the word string replaced with the special symbol as a templatefor selecting the training text; and selecting text covered by thetemplate as the training text from a corpus in a second domain differentfrom the first domain.
 2. The method according to claim 1, wherein thestep of selecting the text covered by the template comprises: generatinga word string for each sentence of the corpus in the second domain; andselecting text covered by the template as the training text from thecorpus in the second domain using the word string generated according tothe generated template.
 3. The method according to claim 1, wherein thestep of selecting the text covered by the template comprises: generatinga word string according the generated template with respect to eachsentence in the corpus in the second domain; calculating a coverage rateof the word string generated according to the generated template; andselecting a sentence having the calculated coverage rate of at least aprescribed value as the training text.
 4. The method according to claim1, wherein the step of generating the template further comprises:extracting a template occurring more than the prescribed times fromamong the generated templates; and selecting text covered by thetemplate extracted from the corpus in the second domain as the trainingtext.
 5. The method according to claim 4, wherein the step of selectingthe text covered by the template comprises: generating a word stringaccording to the extracted template with respect to each sentence in thecorpus in the second domain; and selecting the text covered by thetemplate as the training text from the corpus in the second domain usingthe word string generated according to the extracted template.
 6. Themethod according to claim 5, wherein the step of selecting the textcovered by the template comprises: generating a word string according tothe extracted template with respect to each sentence in the corpus inthe second domain; calculating a coverage rate of the word stringgenerated according to the extracted template; and selecting a sentencehaving the calculated coverage rate of at least a prescribed value asthe training text.
 7. The method according to claim 1, wherein thelanguage model is a language model based on word n-gram.
 8. The methodaccording to claim 1, wherein the special symbol is a wild card.
 9. Themethod according to claim 1, wherein the corpus in the first domain is atarget field corpus and the corpus in the second domain is anout-of-target field corpus.
 10. The method according to claim 1, whereinthe template is a template having one or more words in the word stringbeing replaced with the special symbol.
 11. The method according toclaim 1, further comprising: selecting, as the training text, textcovered by the template generated from the first domain or text having acoverage rate of at least a prescribed value from the corpus in thesecond domain; and training the language model using the selectedtraining text.
 12. A computer-implemented method of selecting trainingtext for a language model comprising: generating a template forselecting training text from a corpus in a first domain by adopting theword string selected from the corpus in the first domain as the templatefor selecting the training text; and selecting text covered by thetemplate as the training text from a corpus in a second domain differentfrom the first domain.
 13. The method according to claim 12, wherein thestep of selecting the text covered by the template comprises: generatinga word string for each sentence of the corpus in the second domain; andselecting text covered by the template as the training text from thecorpus in the second domain using the word string generated according tothe generated template.
 14. The method according to claim 12, whereinthe step of selecting the text covered by the template comprises:generating a word string according the generated template with respectto each sentence in the corpus in the second domain; calculating acoverage rate of the word string generated according to the generatedtemplate; and selecting a sentence having the calculated coverage rateof at least a prescribed value as the training text.
 15. The methodaccording to claim 12, wherein the step of generating the templatefurther comprises: extracting a template occurring more than theprescribed times from among the generated templates; and selecting textcovered by the template extracted from the corpus in the second domainas the training text.
 16. The method according to claim 15, wherein thestep of selecting the text covered by the template comprises: generatinga word string according to the extracted template with respect to eachsentence in the corpus in the second domain; and selecting the textcovered by the template as the training text from the corpus in thesecond domain using the word string generated according to the extractedtemplate.
 17. The method according to claim 16, wherein the step ofselecting the text covered by the template comprises: generating a wordstring according to the extracted template with respect to each sentencein the corpus in the second domain; calculating a coverage rate of theword string generated according to the extracted template; and selectinga sentence having the calculated coverage rate of at least a prescribedvalue as the training text.
 18. The method according to claim 12,wherein the language model is a language model based on word n-gram. 19.The method according to claim 12, wherein the corpus in the first domainis a target field corpus and the corpus in the second domain is anout-of-target field corpus.
 20. The method according to claim 12,further comprising: selecting, as the training text, text covered by thetemplate generated from the first domain or text having a coverage rateof at least a prescribed value from the corpus in the second domain; andtraining the language model using the selected training text.
 21. Acomputer for selecting training text for a language model, the computercomprising: a template generating unit for generating a template forselecting training text from a corpus in a first domain according to atleast one generation technique of: (i) replacing one or more words in aword string selected from the corpus in the first domain with a specialsymbol representing any word or word string, and adopting the wordstring replaced with the special symbol as a template for selecting thetraining text; or (ii) of adopting the word string selected from thecorpus in the first domain as the template for selecting the trainingtext; and a training text selecting unit of selecting text covered bythe template as the training text from a corpus in a second domaindifferent from the first domain.
 22. The computer according to claim 21,wherein the training text selecting unit: generates a word stringaccording to the same generation technique as the generation techniquefor the template generated by the template generating unit with respectto each sentence of the corpus in the second domain; and selects textcovered by the template as the training text from the corpus in thesecond domain using the word string generated according to the samegeneration technique and the generated template.
 23. The computeraccording to claim 22, wherein the training text selecting unit:generates a word string according to the same generation technique asthe generation technique for the generated template with respect to eachsentence in the corpus in the second domain; calculates a coverage rateof the word string generated according to the same generation techniquebeing covered by the generated template; and selects a sentence havingthe calculated coverage rate of at least a prescribed value as thetraining text.
 24. The computer according to claim 21, wherein thetemplate generating unit further extracts a template occurring more thanprescribed times from among the generated templates and the trainingtext selecting unit selects text covered by the template extracted fromthe corpus in the second domain as the training text.
 25. The computeraccording to claim 24, wherein the training text selecting unit:generates a word string according to the same generation technique asthe generation technique for the extracted template with respect to eachsentence in the corpus in the second domain; and selects the textcovered by the template as the training text from the corpus in thesecond domain different from the first domain using the word stringgenerated according to the same generation technique and the extractedtemplate.
 26. The computer according to claim 25, wherein the trainingtext selecting unit: generates a word string according to the samegeneration technique as the generation technique for the extractedtemplate with respect to each sentence in the corpus in the seconddomain; calculates a coverage rate of the word string generatedaccording to the same generation technique being covered by theextracted template; and selects a sentence having the calculatedcoverage rate of at least a prescribed value as the training text.
 27. Acomputer for training a language model, the computer comprising: atemplate generating unit for generating a template for selectingtraining text from a corpus in a first domain according to at least onegeneration technique of: (i) replacing one or more words in a wordstring selected from the corpus in the first domain with a specialsymbol representing any word or word string, and adopting the wordstring replaced with the special symbol as a template for selecting thetraining text, and (ii) adopting the word string selected from thecorpus in the first domain as the template for selecting the trainingtext; a training text selecting unit for selecting text covered by thetemplate or text having a coverage rate of at least a prescribed valueas the training text from a corpus in a second domain different from thefirst domain, the coverage rate being a rate covered by the template;and a language model training unit for training the language model usingthe selected training text.
 28. A computer program product for selectingtraining text for a language model, the program product causing acomputer to execute each step of the method according to claim
 1. 29. Acomputer program product for training a language model, the programproduct causing a computer to execute each step of the method accordingto claim 11.